<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-user-edit" th:object="${user}">
        <input id="id" name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">用户标识：</label>
            <div class="col-sm-8">
                <input id="openid" name="openid" th:field="*{openid}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">unionid：</label>
            <div class="col-sm-8">
                <input id="unionid" name="unionid" th:field="*{unionid}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否订阅：</label>
            <div class="col-sm-8">
                <!--<input id="subscribe" name="subscribe" th:field="*{subscribe}" class="form-control" type="text">-->
                <select class="form-control" name="status" th:with="type=${@dict.getType('wx_user_subscribe')}">
                    <option th:selected="${#strings.equals(user.subscribe,dict.dictValue)}" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                    </option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">昵称：</label>
            <div class="col-sm-8">
                <input id="nickname" name="nickname" th:field="*{nickname}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">性别：</label>
            <div class="col-sm-8">
                <!--<input id="sex" name="sex" th:field="*{sex}" class="form-control" type="text">-->
                <select class="form-control" name="status" th:with="type=${@dict.getType('sys_user_sex')}">
                    <option th:selected="${#strings.equals(user.sex,dict.dictValue)}" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                    </option>
                </select>
            </div>
        </div>
        <!--<div class="form-group">	-->
        <!--<label class="col-sm-3 control-label">语言：</label>-->
        <!--<div class="col-sm-8">-->
        <!--<input id="language" name="language" th:field="*{language}" class="form-control" type="text">-->
        <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">城市：</label>
            <div class="col-sm-8">
                <input id="city" name="city" th:field="*{city}" class="form-control" type="text">
            </div>
        </div>
        <!--<div class="form-group">	-->
        <!--<label class="col-sm-3 control-label">省份：</label>-->
        <!--<div class="col-sm-8">-->
        <!--<input id="province" name="province" th:field="*{province}" class="form-control" type="text">-->
        <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
        <!--<label class="col-sm-3 control-label">国家：</label>-->
        <!--<div class="col-sm-8">-->
        <!--<input id="country" name="country" th:field="*{country}" class="form-control" type="text">-->
        <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">头像：</label>
            <div class="col-sm-8">
                <input id="headimgurl" name="headimgurl" th:field="*{headimgurl}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">关注时间：</label>
            <div class="col-sm-8">
                <input th:value="${user.subscribeTime}" class="form-control layer-date" placeholder="YYYY-MM-DD hh:mm:ss" id="subscribeTime"
                       name="subscribeTime"
                       onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
                <!--<input data-type="date" th:value="*{subscribeTime}" id="hidden_subscribeTime" type="hidden">-->
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">
                <input  value="aaaa" id="hidden_remark" type="hidden">
            </div>
        </div>

    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "wx/user";

    $("#form-user-edit").validate({
        rules: {
            subscribeTime: {
                required: true
            }
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-user-edit').serialize());
        }
    }


</script>
</body>
</html>
